import request from '@/utils/request';

const baseUrl = '/auth';

// 登录接口
export function login(data: LoginData) {
  return request({
    url: `${baseUrl}/login`,
    method: 'post',
    data: data
  });
}

// 重置密码登录
export function rePassword(data: ChangePasswordData) {
  return request({
    url: `${baseUrl}/reToken`,
    method: 'post',
    data: data
  });
}

// 退出接口
export function logout() {
  return request({
    url: `${baseUrl}/logout`,
    method: 'POST'
  });
}